//
//  WatchDetailBaseModel_Info_HQInfo.m
//  ZITHER
//
//  Created by imac on 2018/5/3.
//  Copyright © 2018年 MS1968. All rights reserved.
//

#import "WatchDetailBaseModel_Info_HQInfo.h"

@implementation WatchDetailBaseModel_Info_HQInfo
+ (NSDictionary *)modelContainerPropertyGenericClass {
    return @{@"twoHandPriceInfo": [WatchDetailBaseModel_Info_HQInfo_TwoHandPriceInfo class],
             @"auctionList": [WatchDetailBaseModel_Info_HQInfo_AuctionList class]
             };
}
@end
//
@implementation WatchDetailBaseModel_Info_HQInfo_TwoHandPriceInfo

// 3个月
- (NSString *)threePriceTrendTitle {
    return [self _titleWithStatus:self.withLastThreeMonthState originalTitle:self.withLastThreeMonth];
}
// 6个月
- (NSString *)sixPriceTrendTitle {
    return [self _titleWithStatus:self.withLastSixMonthState originalTitle:self.withLastSixMonth];
}
// 12个月
- (NSString *)twelvePriceTrendTitle {
    return [self _titleWithStatus:self.withOneYearAgoState originalTitle:self.withOneYearAgo];
}

// -- UIColor
// 3个月
- (UIColor *)threePriceTrendTitleColor {
    return [self _titleColorWithStatus:self.withLastThreeMonthState];
}
// 6个月
- (UIColor *)sixPriceTrendTitleColor {
    return [self _titleColorWithStatus:self.withLastSixMonthState];
}
// 12个月
- (UIColor *)twelvePriceTrendTitleColor {
    return [self _titleColorWithStatus:self.withOneYearAgoState];
}
// 文本
- (NSString *)_titleWithStatus:(NSString *)status originalTitle:(NSString *)title {
    NSInteger statusInt = [status integerValue];
    switch (statusInt) {
        case 0: {
            return @"+ 0.00%";
        } break;
        case 1: {
            return kSTRING_FORMAT(@"- %@",title);
        } break;
        case 2: {
            return kSTRING_FORMAT(@"+ %@",title);
        } break;
        case 3: {
            return @"暂无";
        } break;
        default:
            break;
    }
    return @"";
}
// 颜色
- (UIColor *)_titleColorWithStatus:(NSString *)status {
    UIColor *color = [UIColor clearColor];
    NSInteger statusInt = [status integerValue];
    switch (statusInt) {
        case 0:
        case 2:
        case 3:
            color = [UIColor colorF75353];
            break;
        case 1: {
            color = [UIColor colorWithHex:@"#4FB45D"];
        } break;
        default:
            break;
    }
    return color;
}


@end
@implementation WatchDetailBaseModel_Info_HQInfo_AuctionList

@end

